<!DOCTYPE html>
<html lang="en">


<head>
     
    <meta charset="UTF-8" />
     
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
     
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
      <title>Document</title>
    
</head>


<body>
      <div id="liYunLong">你真是个天才！</div>
     </body>

</html>
<script>
    var liYunLong = document.querySelector("#liYunLong");
    class c2 {
        constructor(a, b, c) {
            this.a = a;
            this.b = b;
            this.c = c;
        }
        fn2() {
            alert(this.a);
            liYunLong.style.color = this.a
            return this;
        }
        fn3() {
            alert(this.b);
            liYunLong.style.fontSize = this.b
            return this;
        }
        fn4() {
            alert(this.c);
            liYunLong.innerHTML = this.c
            return this;
        }
    }
    var C = new c2("red", "30px", "你呀，总能给我整点儿花样");
    liYunLong.addEventListener("click", function () {
        C.fn2().fn3().fn4();
    });
</script>